<template>
  <div class="">及时通讯</div>
</template>

<script>
import Vue from 'vue'
import VueSocketio from 'vue-socket.io';
// import MobileIMSDK from 'mobile-im-sdk'
Vue.use(VueSocketio, 'http://localhost:8088');

export default {
  name: "imone",
  title: "IM测试",
  sockets:{
    connect: function(){
      console.log('socket connected')
    },
    customEmit: function(val){
      console.log('this method was fired by the socket server. eg: io.emit("customEmit", data)')
    }
  },
  data () {
    return {
      sdk: MobileIMSDK
    }
  },
  mounted () {
    console.log('1111111111111111', server);
    console.log('1111111111111111', io);
    io.on('connection', function(client){
      client.on('event', function(data){});
      client.on('disconnect', function(){});
    });
    server.listen(3000);
  }
}
</script>

<style lang="less">
</style>
